<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>
    <div id="app">
        {{message}}
        <card></card>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
    <script>
        Vue.component("MyList",{
            data(){
                return {}
            },
            props:["content"],
            template:`<div>{{content}}</div>`
        });
        // Vue.component("card",{
        //     data(){
        //         return {
        //             arr:[1,2,3,4,5]
        //         }
        //     },
        //     template:`
        //         <div>
        //             <my-list v-for="i in arr" :content="i"></my-list>
        //         </div>
        //     `
        // })
        const card = {
            data(){
                return {
                    arr:[1,2,3,4,5]
                }
            },
            template:`
                <div>
                    <my-list v-for="i in arr" :content="i"></my-list>
                </div>
            `
        }
        new Vue({
            el:"#app",
            data:{
                message:"Hello Vue"
            },
            components:{card}
        });
    </script>
</body>
</html>